
{% block body %}
<h1>District list</h1>
<table class="records_list">
    <thead>
        <tr>
            <th>Name</th>
            <th>Population</th>
            <th>Coal</th>
            <th>Metal</th>
            <th>Oil</th>
            <th>Energy</th>
            <th>Coalbonus</th>
            <th>Metalbonus</th>
            <th>Oilbonus</th>
            <th>Energybonus</th>
            <th>Morale</th>
            <th>Actions</th>
        </tr>
    </thead>
    <tbody>
    {% for entity in entities %}
        <tr>
            <td><a href="#content" target-container="#content" data-url="{{ path('district_show', { 'id': entity.id }) }}">{{ entity.name }}</a></td>
            <td>{{ entity.population|number_format }}</td>
            <td>{{ entity.coal|number_format }}</td>
            <td>{{ entity.metal|number_format }}</td>
            <td>{{ entity.oil|number_format }}</td>
            <td>{{ entity.energy|number_format }}</td>
            <td>{{ entity.coalBonus }}</td>
            <td>{{ entity.metalBonus }}</td>
            <td>{{ entity.oilBonus }}</td>
            <td>{{ entity.energyBonus }}</td>
            <td>{{ entity.morale|number_format }}</td>
            <td>
                <ul>
                    <li>
                        <a href="#content" target-container="#content" data-url="{{ path('district_show', { 'id': entity.id }) }}">show</a>
                    </li>
                </ul>
            </td>
        </tr>
    {% endfor %}
    </tbody>
</table>
{% endblock %}
{% block javascripts %}
<script type="text/javascript">
$(document).ready(function(){
    $('.records_list').dataTable({
        "bJQueryUI": true,
        "sPaginationType": "full_numbers"
    });
});
</script>
{% endblock %}
